package com.spsoft.vatoutinv.enums;

/**
 * 发票状态枚举类
 *
 * @author wangy
 */

public enum FpztEnum {

    NORMAL("0", "正常"),
    VOID("2", "作废"),
    RED_FLUSH("3", "已红冲"),
    PARTIAL_RED_FLUSH("7", "部分红冲"),
    FULL_RED_OFFSET("8", "全额红冲");


    public final String key;
    public final String value;

    FpztEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }

    public static boolean isInclude(String key) {
        boolean include = false;
        for (LzfpbzEnum e : LzfpbzEnum.values()) {
            if (e.getKey().equals(key)) {
                include = true;
                break;
            }
        }
        return include;
    }

    public static String getValueByKey(String key) {
        String value = "";
        for (LzfpbzEnum e : LzfpbzEnum.values()) {
            if (e.getKey().equals(key)) {
                value = e.value;
            }
        }
        return value;
    }

}
